package cn.zwx.member.svc.facade;

import cn.zwx.base.entity.ResponseEntity;
import cn.zwx.base.exception.BizWrapException;
import cn.zwx.member.svc.fallback.CaptchaApiFallback;
import cn.zwx.member.svc.vo.GenCaptchaVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author zhangwenxue
 */
@FeignClient(name = "member-svc",path = "/captcha")
public interface CaptchaServiceApi extends FallbackFactory<CaptchaApiFallback> {

    @PostMapping
    CaptchaApiFallback create(Throwable cause);

    /**
     * 生成验证码图片
     * @return 返回验证码信息
     * @throws BizWrapException 返回业务异常信息
     */
    @PostMapping("/get")
    @ApiOperation("生成验证码图片")
    ResponseEntity<GenCaptchaVO> getCaptcha() throws BizWrapException;

}
